An electrophotographic image forming apparatus such as a copy machine and a printer includes an optical scanning device that emits light for forming an electrostatic latent image on a photoreceptor (for example, see Patent Literature 1). The optical scanning device has a bottomed box-like casing opened upward and an upper lid that closes an upper side of the casing. The casing is provided therein with an optical deflector that deflects and scans light beams emitted from a light source, and optical elements (an image forming lens, a return mirror and the like) that lead the light beams deflected and scanned by the optical deflector to a surface to be scanned. The upper lid is formed with an opening for leading the light beams having passed through the optical elements to an outer side of a housing body.
The casing has a bottom wall part and a sidewall part vertically upright from a peripheral edge part of the bottom wall part. The sidewall part is formed on the outside surface thereof with engaging protruding parts that protrude outside of the casing. The upper lid has a rectangular plate like-body plate part and convex parts that protrude downward from parts of each side of the body plate part, which correspond to the engaging protruding parts. The convex part is formed with a rectangular engaging hole. The engaging holes are engaged with the engaging protruding parts of the housing body, so that the upper lid is fixed to the casing.